// 赢牌-碰
class TanpaiMy extends eui.Component {
  public pokerValue: eui.Image
  public tileData: tileData
  public bg1: eui.Image

  public constructor() {
    super()
    this.once(eui.UIEvent.COMPLETE, this.onComplete, this)
    this.skinName = `<e:Skin class="TanpaiPoker" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
      <e:Image x="0" y="18.6" source="winPokerUp_1_png" width="55" height="76"/>
      <e:Image id="bg1" x="0" y="18.6" visible="false" source="winPoker_1_png" width="55" height="76"/>
	    <e:Image id="pokerValue" x="2.5" y="19" scaleY="0.6" scaleX="0.6" source="S_1_png" smoothing="true"/>
    </e:Skin>`
  }
  protected onComplete() {
    this.touchChildren = false
    this.name = 'tanpai'
  }
  public setContent(_skinName: string) {
    this.pokerValue.source = _skinName
  }
  public setData(tileData: tileData) {
    this.tileData = tileData
    this.setContent(tileData.suitType + "_" + tileData.count + "_png")
    this.bg1.visible = false
    this.pokerValue.visible = true
  }
  public setBack() {
    this.bg1.visible = true
    this.pokerValue.visible = false
  }
}